$(function () {
    $("#menber").click(function (e) {
        var phone = $("#phonecall").val();
        var membername = $("#membername");
        $.getJSON("member?phonecall=" + phone, function (result) {
            if (result["error"] === "") {
                console.log(result);
                membername.text("会员:" + result["member"]["Name"]);
                uid = result["member"]["Uid"]
            } else {
                membername.text(result["error"]);
            }
            membername.css("display", "block")
        })
    })
});
var uid = 0;
$(function () {
    $("#finish").click(function () {
        $("#content").addClass("card loader");
        var rid = $("#rid").val();
        $.getJSON("finish?rid=" + rid + "&uid=" + uid, function (result) {
            if (result["success"] > 0) {
                $("#content").removeClass("card loader");
                alert("记录订单成功,返回到主页");
            }
            window.location.href = "business";
        })
    })
});